package com.pushbox.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.pushbox.dao.GameScoreMapper;
import com.pushbox.model.GameScore;
import com.pushbox.service.GameScoreService;
import com.pushbox.vo.ScoreVo;

@Service("gameScoreService")
public class GameScoreServiceImpl implements GameScoreService {

	@Autowired
	private GameScoreMapper gameScoreMapper;

	@Override
	public List<GameScore> getScoreListByUserAndGameID(GameScore gameScore) {
		return gameScoreMapper.selectListByUserAndGameID(gameScore);
	}

	@Override
	public int addGameScore(GameScore gameScore) {
		// TODO Auto-generated method stub
		return gameScoreMapper.insertSelective(gameScore);
	}

	@Override
	public List<ScoreVo> selectMaxScoresByGameID(Integer gameId) {
		// TODO Auto-generated method stub
		return gameScoreMapper.selectMaxScoresByGameID(gameId);
	}

}
